﻿using System.Collections;

namespace CSharpPro._1028;

public class Demo
{
    public void TestPrint()
    {
        ArrayList arrayList = new ArrayList();
        arrayList.Add(1);
        arrayList.Add(1.0);
        arrayList.Add("1");

        foreach (object o in arrayList)
        {
            Console.Write(o);
        }

        Console.WriteLine();
        
        ArrayList arrayList2 = [1, 1.0, "1"];
        foreach (int i in arrayList2)
        {
            Console.Write(i);
        }
        
        /*ArrayList arrayList3 = new ArrayList();
        User user = new User();
        user.Id = 1001;
        arrayList3.Add(user);
        User user2 = new User();
        user2.Id = 1001;
        arrayList3.Add(user2);
        User user3 = new User();
        user3.Id = 1001;
        arrayList3.Add(user3);
        foreach (object o  in arrayList3)
        {
            User u =(User)o;
            Console.Write(u.Id+"/t");
        }*/
        
        
        
        List<int> list = new List<int>();
        list.Add(1);

        
    }
}